import { http, jumpExport } from '@/utils/http/axios';

// 获取竞拍活动列表
export function List(params) {
  return http.request({
    url: '/auction/list',
    method: 'get',
    params,
  });
}

// 删除/批量删除竞拍活动
export function Delete(params) {
  return http.request({
    url: '/auction/delete',
    method: 'POST',
    params,
  });
}

// 添加/编辑竞拍活动
export function Edit(params) {
  return http.request({
    url: '/auction/edit',
    method: 'POST',
    params,
  });
}

// 修改竞拍活动状态
export function Status(params) {
  return http.request({
    url: '/auction/status',
    method: 'POST',
    params,
  });
}

// 操作竞拍活动开关
export function Switch(params) {
  return http.request({
    url: '/auction/switch',
    method: 'POST',
    params,
  });
}

// 获取竞拍活动指定详情
export function View(params) {
  return http.request({
    url: '/auction/view',
    method: 'GET',
    params,
  });
}

// 导出竞拍活动
export function Export(params) {
  jumpExport('/auction/export', params);
}